{% if page_obj %}
<nav class="pagination is-centered1 is-small" role="navigation" aria-label="pagination">
    {% if page_obj.has_previous %}
        <a class="pagination-previous" href="?page={{ page_obj.previous_page_number }}{{ params }}">{{ pre_name }}</a>
    {% endif %}
    {% if page_obj.has_next %}
        <a class="pagination-next" href="?page={{ page_obj.next_page_number }}{{ params }}">{{ next_name }}</a>
    {% endif %}
    <ul class="pagination-list">
        {% for p in page_obj.paginator.get_elided_page_range %}
        {% if p != '...' %}
        <li>
            <a href="?page={{ p }}{{ params }}"
                class="pagination-link {% if page_obj.number == p %} is-current {% endif %}" 
                    {% if page_obj.number == p %}aria-current="page" {% endif %} aria-label="Goto page {{ p }}">
            {{ p }}
            </a>
        </li>
        {% else %}
        <li><span class="pagination-ellipsis">&hellip;</span></li>
        {% endif %}
        {% endfor %}
    </ul>
</nav>
{% endif %}